package com.gemfire.onlineretailer.domain;

/**
 * This is the main POJO to be created and populated and persisted by the Payment Voucher system. This becomes a transaction whoch is posted in the General Ledger and affects the books 
 * of the Organization.
 *  
 * @author Binit Datta
 */

import java.io.Serializable;
import java.util.Date;

public class PaymentVoucher implements Serializable {

	  private static final long serialVersionUID = 1L;

	  String voucherNo;
	  private AccountHeads debitTheReceiver;
	  private AccountHeads creditTheGiver;
	  private double amount;
	  private int paymentVoucherType;
	  private Employee userId;
	  private Date timeStamp;
	  
	  
	public String getVoucherNo() {
		return voucherNo;
	}
	public void setVoucherNo(String voucherNo) {
		this.voucherNo = voucherNo;
	}
	public AccountHeads getDebitTheReceiver() {
		return debitTheReceiver;
	}
	public void setDebitTheReceiver(AccountHeads debitTheReceiver) {
		this.debitTheReceiver = debitTheReceiver;
	}
	public AccountHeads getCreditTheGiver() {
		return creditTheGiver;
	}
	public void setCreditTheGiver(AccountHeads creditTheGiver) {
		this.creditTheGiver = creditTheGiver;
	}
	public double getAmount() {
		return amount;
	}
	public void setAmount(double amount) {
		this.amount = amount;
	}
	public int getPaymentVoucherType() {
		return paymentVoucherType;
	}
	public void setPaymentVoucherType(int paymentVoucherType) {
		this.paymentVoucherType = paymentVoucherType;
	}
	public Employee getUserId() {
		return userId;
	}
	public void setUserId(Employee usedId) {
		this.userId = usedId;
	}
	public Date getTimeStamp() {
		return timeStamp;
	}
	public void setTimeStamp(Date timeStamp) {
		this.timeStamp = timeStamp;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	 @Override
	  public String toString() {
	    
		 StringBuffer buff = new StringBuffer();
		 
		 buff.append(" Vocher Number :"+voucherNo);
		 buff.append(" Debit Ac code :"+debitTheReceiver);
		 buff.append(" Credit Ac Code :"+creditTheGiver);
		 buff.append(" Amount :"+amount);
		 buff.append(" Voucher Type :"+paymentVoucherType);
		 buff.append(" User ID :"+userId);
		 buff.append(" Voucher Data:"+timeStamp);
		
	

		 return buff.toString();
		 
	  }
	  

}
